Quick Start
在未名超算,执行以下命令即可,其他超算平台类似。
1 | module add gcc/7.2.0 intel/2017.1 mpich/3.2.1-intel-2017.1 #添加模块 |
Full Instructions
We use traditional make.
To build with this package, you must download and build the Voro++ library.
You can download and build the Voro++ library manually if you prefer; follow the instructions in lib/voronoi/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/voronoi/Install.py script with the specified args:
1 | make lib-voronoi # print help message |
Note that 2 symbolic (soft) links, “includelink” and “liblink”, are created in lib/voronoi to point to the Voro++ src dir. When LAMMPS builds in src it will use these links. You should not need to edit the lib/voronoi/Makefile.lammps file.
The README in src/VORONOI
The VORONOI package adds a compute voronoi/atom command which calculates a Voronoi tesselation of the system.
It uses the Voro++ library, available at http://math.lbl.gov/voro++/ to compute the tesselation locally on each processor. Voro++ was developed by Chris H. Rycroft while at UC Berkeley / Lawrence Berkeley Laboratory.
That library can be downloaded and built in lib/voronoi or elsewhere on your system, which must be done before bulding LAMMPS with this package. Details of the download, build, and install process for Voro++ are given in the lib/voronoi/README file, and scripts are provided to help automate the process. Also see the LAMMPS manual for general information on building LAMMPS with external libraries. The settings in the Makefile.lammps file in lib/voronoi must be correct for LAMMPS to build correctly with this package installed.
Once you have successfully built LAMMPS with this package and Voro++, you can test it using an input file from the examples dir:
1 | ./lmp_serial < lammps/examples/voronoi/in.voronoi | grep '^TEST_' |
The output should conclude with ‘TEST_DONE’ and every line should report an error of 0%.
== Credits and license ==
This compute was written by Daniel Schwen (daniel@schwen.de) and is licensed under the GPLv2 license.
Please contribute changes back to the community.
The README in lib/voronoi
This directory contains links to the Voro++ library which is required to use the VORONOI package and its compute voronoi/atom command in a LAMMPS input script.
The Voro++ library is available at http://math.lbl.gov/voro++ and was developed by Chris H. Rycroft while at UC Berkeley / Lawrence Berkeley Laboratory.
You can type “make lib-voronoi” from the src directory to see help on how to download and build this library via make commands, or you can do the same thing by typing “python Install.py” from within this directory, or you can do it manually by following the instructions below.
Instructions:
Download Voro++ at http://math.lbl.gov/voro++/download
either as a tarball or via SVN, and unpack the
tarball either in this /lib/voronoi directory
or somewhere else on your system.Compile Voro++ from within its home directory
% makeThere is no need to install Voro++ if you only wish
to use it from LAMMPS. You can install it if you
wish to use it stand-alone or from other codes:
a) install under the default /usr/local
% sudo make install
b) install under a user-writeable location by firstchanging the PREFIX variable in the config.mk file, then
% make install
Create two soft links in this dir (lib/voronoi)
to the Voro++ src directory is. E.g if you built Voro++ in this dir:
% ln -s voro++-0.4.6/src includelink
% ln -s voro++-0.4.6/src liblink
These links could instead be set to the include and lib
directories created by a Voro++ install, e.g.
% ln -s /usr/local/include includelink
% ln -s /usr/local/lib liblink
When these steps are complete you can build LAMMPS with the VORONOI package installed:
1 | cd lammps/src |
Note that if you download and unpack a new LAMMPS tarball, the “includelink” and “liblink” files will be lost and you will need to re-create them (step 4). If you built Voro++ in this directory (as opposed to somewhere else on your system) and did not install it somewhere else, you will also need to repeat steps 1,2,3.
The Makefile.lammps file in this directory is there for compatibility with the way other libraries under the lib dir are linked with by LAMMPS. However, Voro++ requires no auxiliary files or settings, so its variables are blank.
治bug者
出错原因有二
1.没有加载模块。执行module add mpi/mpich/3.2.1 intel/2018.0 gcc/6.4.0
后,无法并行编译的问题解决。
2.没有安装python
1 | . |
由于lammps只能使用python2,所以通过module anacode/2.5.2
加载python模块。
然后make mpi
,结果又出现了下面bug:
1 | . |
第二天,才发现,是PYTHON包的原因,在src中卸载该包,再次编译,成功!!!
原因回顾:并不因为VORONOI包的原因,而是PYTHON包的原因。我感觉即使是加载了ANACODA,也没有调用成功python。需要联系超算管理员给权限安装python。